package org.bim.view.drag.design.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;

/**
 * @author bim-view
 * @date 2021/12/17 2:53 下午
 */
@Configuration
public class WebMvcConfigurer implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer {
    @Value("${app.api-prefix: /blade-visual}")
    public String apiPrefix;

    @Override
    public void configurePathMatch(PathMatchConfigurer configurer) {
        configurer.addPathPrefix(apiPrefix, c -> true); // 为所有接口添加api前缀
    }
}
